import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/pages/index/Index.vue'
import City from '@/pages/city/City.vue'
import Search from '@/pages/search/Search.vue'
import Seller from '@/pages/Seller/Seller.vue'
import Order from '@/pages/order/Order.vue'
import User from '@/pages/user/User.vue'
import Goods from '@/pages/goods/Goods.vue'
import SellerInfo from '@/pages/sellerInfo/SellerInfo.vue'
import Ratings from '@/pages/ratings/Ratings.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index
    }, {
      path: '/city',
      name: 'City',
      component: City
    }, {
      path: '/search',
      name: 'Search',
      component: Search
    }, {
      path: '/order',
      name: 'Order',
      component: Order
    }, {
      path: '/seller/:id',
      name: 'Seller',
      component: Seller,
      children: [
        {
          path: '/seller/:id/goods',
          name: 'goods',
          component: Goods
        },
        {
          path: '/seller/:id/sellerInfo',
          name: 'menu',
          component: SellerInfo
        },
        {
          path: '/seller/:id/ratings',
          name: 'ratings',
          component: Ratings
        }
      ]
    }, {
      path: '/user',
      name: 'User',
      component: User
    }
  ]
})
